import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '回复内容',
    align: "center",
    dataIndex: 'reply'
  },
  {
    title: '寻问条件',
    align: "center",
    dataIndex: 'ask'
  },
  {
    title: '提问列表',
    align: "center",
    dataIndex: 'askList'
  },
  {
    title: '是否常见问题',
    align: "center",
    dataIndex: 'ifCommon_dictText'
  },
  {
    title: '排序',
    align: "center",
    dataIndex: 'sort'
  },
  {
    title: '启用状态',
    align: "center",
    dataIndex: 'status'
  },
  {
    title: 'tenantId',
    align: "center",
    dataIndex: 'tenantId'
  },
  {
    title: '删除状态(0-正常,1-已删除)',
    align: "center",
    dataIndex: 'delFlag'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '回复内容',
    field: 'reply',
    component: 'Input',
  },
  {
    label: '寻问条件',
    field: 'ask',
    component: 'Input',
  },
  {
    label: '提问列表',
    field: 'askList',
    component: 'InputTextArea',
  },
  {
    label: '是否常见问题',
    field: 'ifCommon',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "if_common"
    },
  },
  {
    label: '排序',
    field: 'sort',
    component: 'InputNumber',
  },
  {
    label: '启用状态',
    field: 'status',
    component: 'InputNumber',
  },
  {
    label: 'tenantId',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '删除状态(0-正常,1-已删除)',
    field: 'delFlag',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
